#ifndef QUEUE_H_
#define QUEUE_H_

#include <stdbool.h>

//typedef int Item;
typedef struct {
    long arrive;
    int processtime;
} Item;

#define MAXQUEUE 20

typedef struct node {
    Item item;
    struct node * next;
} Node;

typedef struct queue {
    Node * head;
    Node * tail;
    int len;
} Queue;


//interface
void InitializeQueue(Queue *);

bool QueueIsFull(const Queue *);

bool QueueIsEmpty(const Queue *);

int QueueItemCount(const Queue *);

bool EnQueue(Item item, Queue *);

bool DeQueue(Item * item, Queue *);

void EmptyTheQueue(Queue *);


#endif
